package com.exartisan.util;

import android.app.Activity;
import android.os.Bundle;

import com.facebook.Session;
import com.facebook.widget.FacebookDialog;
import com.facebook.widget.WebDialog;

public class FbUtil {

	public static final String ACCESS_TOKEN = "CAACTcgcPDfIBAAHo28dRXQ5vyXzRU7lEESUJm0DDSEMABrGGOpbI60sYaIlYiWVkomNleG7NWDfMt08VNznnzZAVrDkXHbDOZA8qfK4REKZCyOXwO9OZCtIeCc3U1bdIDIdSETZCQXPiiEs5Eoo9UOQGnkwVQGe9jXwCu8Eg7ezdkKYtt1piFvLiIq2r5s2NtinRykzHBWHvpgoY96ZCdXfnEAMrc3laYrgU0k3cJZCSAZDZD";
	public static final String YN_LINK = "http://www.thanhdoanhanoi.gov.vn/";
	
	public static void ShareToFb(Activity activity,String title, String desc, String url, String imgUrl){
		if (FacebookDialog.canPresentShareDialog(activity,FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
		FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(activity)
		.setName(title)
		.setDescription(desc)
		.setPicture(imgUrl)
		.setLink(url)
		.build();
		shareDialog.present();
		}
		else {
			Bundle params = new Bundle();
			params.putString("name", title);
			params.putString("description", desc);
			params.putString("link", url);
			params.putString("picture", imgUrl);
			WebDialog feedDialog = new WebDialog.FeedDialogBuilder(activity, Session.getActiveSession(), params)
			.build();
			feedDialog.show();
		}
	}
	
}
